package com.singularity.onelabel.utils;

import android.content.Context;
import android.widget.Toast;

import java.net.ContentHandler;

/**
 * Created by Lenovo on 2018/11/14.
 * 封装消息提示弹框类
 */

public class ToastUtils {

    private static volatile ToastUtils instance = null;

    // 单例模式创建 ToastUtils 实例
    public static ToastUtils getInstance(){
        if (instance == null){
            synchronized (ToastUtils.class){
                if (instance == null){
                    instance = new ToastUtils();
                }
            }
        }
        return instance;
    }

    // 输出弹窗日志
    public void showToast(Context context , String msg){
        Toast.makeText(context,msg,Toast.LENGTH_SHORT).show();
    }
}
